import {systemManageService} from '../../tools/servers'

export class SystemManageService {

  //查询所有文章
  static findAllArticle(){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findAllArticle,arguments,"GET");
    return systemManageService.connection(httpMethod,"/generate/findAllArticle",body)
  }

  //保存修改文章信息
  static saveArticle(articleDto){
    var httpMethod = "POST";
    let body = systemManageService.getArgs(this.saveArticle,arguments,"POST");
    return systemManageService.connection(httpMethod,"/generate/saveArticle",body)
  }

  //根据id查询文章内容
  static findArticleById(articleId){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findArticleById,arguments,"GET");
    return systemManageService.connection(httpMethod,"/generate/findArticleById",body)
  }

  //新增一篇文章
  static addArticle(articleDto){
    var httpMethod = "POST";
    let body = systemManageService.getArgs(this.addArticle,arguments,"POST");
    return systemManageService.connection(httpMethod,"/generate/saveArticle",body)
  }

  //查询审核意见
  static auditOpinions(){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.auditOpinions,arguments,"GET");
    return systemManageService.connection(httpMethod,"/generate/auditOpinions",body)
  }

  static findOpinionById(articleId){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findOpinionById,arguments,"GET");
    return systemManageService.connection(httpMethod,"/generate/findOpinionById",body)
  }
  static updateOpinion(articleAuditDto){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.updateOpinion,arguments,"GET");
    return systemManageService.connection(httpMethod,"/generate/updateOpinion",body)
  }
  //查询所有栏目
  static findAllColumns(){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findAllColumns,arguments,"GET");
    return systemManageService.connection(httpMethod,"/generate/findAllColumns",body)
  }

  //查询所有操作员
  static findAllOperators(){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findAllOperators,arguments,"GET")
    return systemManageService.connection(httpMethod,"/simple/findAllOperators",body)
  }
  static findColumnById(columnId){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findColumnById,arguments,"GET")
    return systemManageService.connection(httpMethod,"/generate/findColumnById",body)
  }
  static addColumn(column){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.addColumn,arguments,"GET")
    return systemManageService.connection(httpMethod,"/generate/addColumn",body)
  }
  static updateColumn(column){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.updateColumn,arguments,"GET")
    return systemManageService.connection(httpMethod,"/generate/updateColumn",body)
  }
  static findAllCourseAnswers(){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findAllCourseAnswers,arguments,"GET")
    return systemManageService.connection(httpMethod,"/generate/findAllCourseAnswers",body)
  }
  static findCourseAnswerById(eid){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findCourseAnswerById,arguments,"GET")
    return systemManageService.connection(httpMethod,"/generate/findCourseAnswerById",body)
  }
  static updateCourseAnswers(courseAnswers){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.updateCourseAnswers,arguments,"GET")
    return systemManageService.connection(httpMethod,"/generate/updateCourseAnswers",body)
  }
  static addCourseAnswers(courseAnswers){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.addCourseAnswers,arguments,"GET")
    return systemManageService.connection(httpMethod,"/generate/addCourseAnswers",body)
  }

  //查询所有权限
  static findAllPermissions(){
    var httpMethod = 'GET';
    let body = systemManageService.getArgs(this.findAllPermissions,arguments,"GET")
    return systemManageService.connection(httpMethod,"/simple/findAllPermissions",body)
  }

}
